<?php

//8/29/2009: immanuel192 rewrite this code
// Feb 11, 2011 -trungdt -- Add remove html in body mode

if (!defined('EXPONENT')) exit('');

$link = null;
if (isset($_GET['id'])) {
	$link = $db->selectObject('gbible_dic','id='.intval($_GET['id']));
}

if (($link && exponent_permissions_check('edit',$loc)) || (!$link && exponent_permissions_check('create',$loc))) {
	$form = dicmodule_dic::form($link);
	$form->location($loc);
	$form->meta('action','save');
	
	$template = new template('dicmodule','_form_edit');
	$template->assign('is_edit',(isset($link->id)? 1 : 0));
	$template->assign('form_html',$form->toHTML());
	$template->output();
} else {
	echo SITE_404_HTML;
}

?>